package com.tengroup.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tengroup.entity.StudentScoreEntity;

import java.time.LocalDateTime;
import java.util.List;

public interface StudentScoreService extends IService<StudentScoreEntity> {
    Integer addScore(int i);//半手动添加版
    Integer addScoreByHand(StudentScoreEntity studentScoreEntity);//全手动添加版
    Integer updateScore(StudentScoreEntity studentScoreEntity);
    Integer deleteScore(Long id);
    IPage<StudentScoreEntity> QueryClassId(StudentScoreEntity studentScoreEntity, int pageNo, int pageSize);
    IPage<StudentScoreEntity> QueryPaperId(StudentScoreEntity studentScoreEntity, int pageNo, int pageSize);
    IPage<StudentScoreEntity> QueryUserId(StudentScoreEntity studentScoreEntity, int pageNo, int pageSize);
    List<StudentScoreEntity> getScoreByUserId(Long userId);
    List<StudentScoreEntity> getScoreByClassId(Long classId);
    Double getAverageScoreByPaperIdAndUserId(Long paperId, Long userId);
    Double getAverageScoreByPaperIdAndClassIdAndExamTime(Long paperId, Long classId, LocalDateTime examTime);
}
